home *** CD-ROM | disk | FTP | other *** search
/ QRZ! Ham Radio 8 / QRZ Ham Radio Callsign Database - Volume 8.iso / mac / files / t_sys5 / 92052tar.gz / 920528.tar / telnet.h < prev    next >
C/C++ Source or Header  |  1991-05-10  |  1KB  |  52 lines

  1. /* @(#) $Header: telnet.h,v 1.5 91/05/09 07:39:04 deyke Exp $ */
  2.  
  3. #ifndef _TELNET_H
  4. #define _TELNET_H
  5.  
  6. #ifndef _SESSION_H
  7. #include "session.h"
  8. #endif
  9.  
  10. #define LINESIZE        256     /* Length of local editing buffer */
  11.  
  12. /* Telnet command characters */
  13. #define IAC             255     /* Interpret as command */
  14. #define WILL            251
  15. #define WONT            252
  16. #define DO              253
  17. #define DONT            254
  18.  
  19. /* Telnet options */
  20. #define TN_TRANSMIT_BINARY      0
  21. #define TN_ECHO                 1
  22. #define TN_SUPPRESS_GA          3
  23. #define TN_STATUS               5
  24. #define TN_TIMING_MARK          6
  25. #define NOPTIONS                6
  26.  
  27. /* Telnet protocol control block */
  28. struct telnet {
  29.     struct tcb *tcb;
  30.     char state;
  31.  
  32. #define TS_DATA 0       /* Normal data state */
  33. #define TS_IAC  1       /* Received IAC */
  34. #define TS_WILL 2       /* Received IAC-WILL */
  35. #define TS_WONT 3       /* Received IAC-WONT */
  36. #define TS_DO   4       /* Received IAC-DO */
  37. #define TS_DONT 5       /* Received IAC-DONT */
  38.  
  39.     char local[NOPTIONS+1];   /* Local option settings */
  40.     char remote[NOPTIONS+1];  /* Remote option settings */
  41.  
  42.     struct session *session;        /* Pointer to session structure */
  43. };
  44. #define NULLTN  (struct telnet *)0
  45. extern int Refuse_echo;
  46. extern int Tn_cr_mode;
  47.  
  48. /* In telnet.c: */
  49. void rcv_char __ARGS((struct tcb *tcb, int cnt));
  50.  
  51. #endif  /* _TELNET_H */
  52.